#Visual Studio 2010
Explore tagged Tumblr posts
Text
Visual Studio 2010 dependent dlls loaded without being referenced
In all my projects, I usually have a "lib" folder that contains 3rd party dlls that the project will reference.
In one particular project using n2cms I have a lot of dlls to reference. I discovered that by adding just 3 project references the other dlls that those references depend on automatically get copied to my output directory (/bin). All the dlls are located in /Lib/N2, and the N2 folder itself is included in the project but the dlls inside are not.
I verified that the dependent dlls only get copied to the output directory if they are in the same folder as the other referenced dlls. If I put them in a subfolder, say /Lib/N2/subfolder, then they do not get copied.
Here's what's in my web.config:
<Reference Include="N2">
<HintPath>Lib\N2\N2.dll</HintPath>
</Reference>
<Reference Include="N2.Extensions">
<HintPath>Lib\N2\N2.Extensions.dll</HintPath>
</Reference>
<Reference Include="N2.Management">
<HintPath>Lib\N2\N2.Management.dll</HintPath>
</Reference>
And then upon building the solution, I get NHibernate.dll, Castle.Core.dll, and Castle.Windsor.dll in my /bin folder. Pretty neat.
79 notes
·
View notes
Text
48 free videos about ASP.NET 4 and Visual Studio 2010
This course is not finished yet, so you can expect more videos soon.
Here is the list:
Web Application Versus Web Site
Web Application Versus Site
Controls
Label and Literal Control
Input Boxes Properties and Events
Auto Complete and RadioButtons
Three ways to submit form data
Posting Back to Another Page
Command Buttons and Client Actions
Using panels
CSS
Evolution of CSS
Styles
Unordered list
Manage styles
Validation Controls
Introduction
Text property
InitialValue property
CompareValidator
Regular Expression Validator
CustomValidator and ValidationSummary
Building validation control class
Calendar Control
Holidays: Calendar Control
AdRotator
Wizard Control
Silverlight
Silverlight
Master Page
Introduction
ContentplaceHolders
Master Page File
PreInit method
Themes
Themes
Difference between a Theme and a StyleSheetTheme
CSS
User Controls
User Controls
Manipulating User Controls
AJAX
MVC
Introduction
ViewBag
Adding
Controller
View
Model - Part 1
Model - Part 2
Model - Part 3
Data Access
Lists
Grid
Hierarchical
Templated
Two Way Data Binding
Errors and Stored Procs
Using Filters and Cookie Parameter
33 notes
·
View notes
Link
I was worried that Robotics Studio would be left out to dry, but Microsoft has released a beta of version 4. It finally supports Visual Studio 2010 and it supports Kinect!
22 notes
·
View notes
Text
Debugar ASP Clássico no Visual Studio 2010
Para quem está acostumado com as facilidades do Visual Studio, assim como eu estou, nada melhor do que debugar seu código de Asp clássico, com toda comodidade, com mais agilidade e ganho de tempo, ao invés dos clássicos response.write.
Como o Visual Studio 2010 é desenvolvido para rodar C#, Vb.net, scripts, etc., para debugar o Asp é necessário realizar alguns procedimentos que descreverei abaixo.
Primeiro, o site (página) precisa estar criado no IIS, e ao chamá-lo no browser funcionar corretamente. Para configurar o IIS, deve-se marcar na guia ASP, em Propriedades de Depuração, os itens "Habilitar Depuração do Lado do Cliente" e "Habilitar Depuração do Servidor" como true, como demostrado na figura abaixo:

Executar o Visual Studio em modo de administrador conforme figura abaixo, pois é necessário para anexar o processo que será debugado.

Após abrir o site, clicar com botão direito em propriedades (F4) na raiz do site, conforme demostrado abaixo:

Clicar em "Start Options" e marcar em Server a opção "Use custom server", digitar em "Base URL" o caminho que está configurado no IIS para o site. Em "Debuggers" marcar as opções desejadas para debugar, ressaltando que é fundamental marcar a opção Native Code. Clicar em Ok, conforme figura abaixo:

Clicar em debugar (F5), será aberto uma janela o qual irá perguntar se deseja permitir debug do site, clicar em OK. Será adicionada a seguinte linha no arquivo web.config:

Clicar no menu Tools >> Attach to Process, conforme figura abaixo:

Clicar no checkbox "Show processes in all sessions". Procurar o processo w3wp.exe e clicar no botão "Attach", conforme figura abaixo:

Pronto, o site já esta configurado para debugar o Asp. Para debugar, deve-se marcar com breakpoint os arquivos que serão carregados ao anexar o processo w3wp. Na Solution Explorer irá carregar esses arquivos, para carregar os arquivos do site todo, conforme a navegação do site é realizada, são criados as páginas.
Debugando o site:
No Visual Studio existe alguns comandos e atalhos para se debugar código, entre eles:
- Para marcar uma linha o qual o cursor do debug deverá parar, apertar a tecla F9. A linha ficará em vermelho, conforme figura abaixo:

Para que o cursor possa ir realizando todo o processo de depuração, utilizar o F10 para passar em todas as linhas, e o F11 para entrar em uma função, ou seja, se desejar somente ver o resultado da função, continuar apertando F10, ou para ver o funcionamento da função, ao chegar na linha da função, apertar F11. Exemplo:

Para ver o valor que tem em alguma variável, session, conteúdo, etc, selecionar o item desejado e clicar em SHIFT + F9. Será aberta uma janela onde será mostrado o valor do item, conforme figura abaixo:

Para ver o valor sendo preenchido em todas etapas para um determinado item, selecionar o mesmo e clicar no botão direito do mouse. Depois clicar em Add Watch. Em todos os momentos que a variável mudar de valor, esse novo valor será mostrado na tela que se abre abaixo do código, conforme figura abaixo:

Para tirar todos os breakpoints do código apertar Shift + F9.
Para parar o debug apertar Shift + F5. Para começar o debug desde a tela inicial do site, apertar F11 ao iniciar o site.
Neste post explico alguns passos básicos para debug de Asp Clássico, mas que são bem importantes para quem está buscando uma maneira de depurar o código com maior eficiência e agilidade.
20 notes
·
View notes
Link
Another useful step
"The Web Application Project is configured to use IIS. To access Web sites on the local IIS Web server, you must run Visual Studio under an Administrator account
So, right click shortcut on VS 2008 > Properties > Compatibility tab > check run this program as an administrator
Yet another useful step
In Local security policy, add to administators and developer to your user.
20 notes
·
View notes
Text
Mobile Web Development Emulation Overview
As fall slowly arrives and I think back through some of the quotes I've been estimating it has dawned on me that I really need a strategy for architecting ASP.NET mobile websites and testing them on the various devices we intend to support.
While the list below is not all encompassing it does provide a good starting point for testing and/or developing for the major devices currently utilize d on the market today.
Note: Depending on how "deep" you want your testing to go I'd suggest deploying a Virtual PC image of Windows 7 to use solely for your mobile testing initiatives. I've noticed that developers that adopt this methodology tend to have one Virtual PC image for each mobile platform they test and work with.
Android: Download the latest SDK from http://developer.android.com/sdk/index.html . As of the writing of this post I'm unsure of the compatibility differences between the various Android versions. However, I would suggest downloading the latest version and work-out any bugs as they arise. After downloading the SDK you'll need to download the images of the platforms you want to support. Then, you can download:
a. Firefox - http://www.mozilla.org/en-US/m/firefox/channel/
b. Opera Mini - http://www.opera.com/download/get.pl?sub=++++&id=33290&location=270¬hanks=yes/
c. Skyfire - http://www.skyfire.com/product/android
Apple iOS: (Mac not included :-) ) https://developer.apple.com/devcenter/ios/index.action#downloads I'm not going to pretend to know a lot here but it is my understanding that Xcode 4 should contain the simulators needed to test a wide swath of devices including the iPad, iPhone and iPod.
Windows Phone 7: Microsoft, like Apple, makes this process pretty simple. You have a couple of choices depending on how you have your development environment setup.
Existing Visual Studio 2010 IDE users should download the following
Windows Phone OS 7.1 SDK RC - http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=27153
Once installed you can then create a new Windows Phone project and load the emulator from there. I'm sure there is a better way to do this and I'll provide more information on this during my travels.
Users just want to emulate Windows Phone 7 without installing Visual Studio 2010 should download the following
Windows Phone OS 7.0 Documentation - http://msdn.microsoft.com/en-us/library/ff402530(v=vs.92).aspx
Windows Phone OS 7.1 SDK RC - http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=27153
Blackberry: A whole host of devices and their simulators can be found at http://us.blackberry.com/developers/resources/simulators.jsp . You'll need to download and install the individual browser for each device but once you have this process setup correctly testing should be a breeze.
No, the list get's longer. If you thought scripting your style sheets, html and Java Script to be compatible in four to five browsers you haven't seen anything yet. Enter the best emulator/simulator list I've found thus far http://www.mobilexweb.com/emulators .
15 notes
·
View notes
Text
SBP Dag 6: Een nieuwe week, een nieuw hoofdstuk
Nadat we vorige week onze globale analyse in orde gebracht hebben, kunnen we beginnen met de 'coding'.
In de voormiddag hebben we Ankh SVN geïnstalleerd om met Sub Version te kunnen werken in Visual Studio 2010. Daarna zijn we begonnen met het project aan te maken binnen Visual Studio 2010. Binnen het project in VS2010 hebben wij dan de nodige bestandjes aangemaakt. Zo zijn de domeinklassen, interface repository, scripts en een aantal dependencies toegevoegd aan het project.
De opdracht 'prijsofferte' is op dit moment in volle gang. De opdracht was even wat onduidelijk, maar met de hulp van Dhr. Decoster begrepen we hoe de opdracht moest aangepakt worden. De opdracht zal waarschijnlijk morgen afgewerkt worden tijdens de dag.
Ook kregen we te horen dat ons fictief bedrijf een betere, creatievere naam moet krijgen. Voorlopig gebruiken we de naam 'Team De Branding'. Dit kan nog veranderd worden in de nabije toekomst.
12 notes
·
View notes
Text
OData + ASP.NET + EF + IIS7
I had some real difficulty getting my new WCF Data Service deployed and running on my local network. It was a myriad of problems, but I finally got it working after trolling several sites and doing some sleuthing on my own. Here's the breakdown: I created an empty ASP.NET web project, and then added a new WCF Data Service (Why I can't make a WCF Data Service project, I don't know). Then I added an ADO.NET Entity Framework (edmx) pointed to my database. After testing the site out locally, I was ready to deploy to my local IIS7 install. By the way, if you want to allow the $format=json request param to get your results as JSON, use this project from this guy's blog. After following this page (very closely!!), I thought I would be rolling, but it was as if the app couldn't access the database when deployed. After doing some digging, I checked into my SQL Server connection and realized I was using Windows authentication when I created my EF data source. So, I went into SQL Management Studio and created a new account against my DB. I also had to enable SQL authentication, where it was set to only allow Windows authentication.
Now I was able to pull data from IIS7 locally, but I couldn't get my macbook to hit the server, although it could ping. Immediately you'd think "firewall issue", but I had disabled the Windows Firewall and stupid Symantec Endpoint services to no avail. After growing frustrated, I then broke for food and beer, which always help.
Resuming, I decided to tinker with my firewall again, this time enabling the firewall, leaving Symantec off, and turning on the rule that allows traffic on port 80 in the Windows Firewall->Advanced Settings (It was turned off by default).
Testing again from my mac was successful and there was much rejoicing. Sadly, that took me most of the afternoon to figure out, which is why I'm here.
As suggested in one of the posts I read, always create a test SQL Server account and use SQL authentication for your apps.
#WCF Data Service#Windows 7 64-bit#IIS7#Visual Studio 2010#OData#Entity Framework#SQL Server 2008 R2
10 notes
·
View notes
Text
How to add the Solution Platform dropdown to Visual Studio 2010 toolbar to quickly select cpu architecture when building
In my standard toolbar in Visual Studio 2010 I can select my solution configuration: debug, release, etc. But I can't pick my cpu architecture, ie, solution platform: x86 or x64. I didn't even know it was possible to select from the toolbar until I saw it on Elliot's toolbar. Call it toolbar envy.
To add it, go to Tools->Customize. Click on the Commands tab. Pick the toolbar you want to add it to. I added it to the standard toolbar so it can go right next to the solution configuration dropdown.
Click Add Command, choose Build category, then select Solution Platforms. Then you can move it up and down or whatever to get it where you want it.
29 notes
·
View notes
Text
Modernizr
Usually cross-browser support is hard to achieve, especially for css 3.0 and html 5. But this could work!
Also on the subject of html 5 , css 3 and visual studio read Scott Hanselman post .
7 notes
·
View notes
Text
SlimDX y DirectX 11 - Cache de shaders compilados
Dado que la solución estaba tardando casi 5 minutos en compilar por culpa de unos compute shaders que estoy usando para comparar performance, armé una pequeña clase que se encarga de cachear los shaders. Si el código fuente de un shader no fue modificado respecto del utilizado para compilarlo en la ejecución anterior, no se compila y se utiliza el bytecode almacenado.
El código fuente de la solución entera no lo subo porque tengo que ordenar varias partes, pero dejo todo el código de la clase ShaderCache al final del post.
Pseudo-pseudocódigo:
public static Effect ObtenerEffect(string fileName) { if (BuscarShaderEnCacheYActualizar(fileName)) { bytecode = Leer bytecode desde filename + ".cache" } else { bytecode = CompilarBytecode(fileName) Almacenar bytecode en disco en filename + ".cache" } return CrearEfecto(bytecode) } private static bool BuscarShaderEnCacheYActualizar(string fullFilePath) { md5 = CalcularMD5(fileName, fileBaseDir); Buscar fullFilePath en cacheEntries.txt if (No se encontró) { Agregar la entrada "fullFilePath \t md5" return false; //Nuevo shader, habrá que compilar el bytecode } else { Comparar md5 contra MD5 almacenado if (Son iguales) { return true; //Utilizar bytecode cacheado } else { Actualizar el MD5 almacenado con md5 return false; //Shader modificado, habrá que compilar el bytecode } } } private static string CalcularMD5(string fileName, string fileBaseDir) { md5 = GenerarMD5(fileBaseDir + fileName) //Recursivamente concatenar los MD5 de los #include para detectar cambios en estos foreach (#include que haya en el shader) md5 += CalcularMD5(includeFileName, fileBaseDir) return md5; }
CacheEntries
Para detectar si un shader fue modificado, se mantiene en disco una tabla cuyos registros son de la forma (ruta al archivo del shader \t MD5 de su código fuente). Esta tabla no es más que un archivo de texto tabulado, ubicado en Framework\Resources\ShadersCache\cacheEntries.txt.
MD5
El cálculo del MD5 se realiza utilizando el método MD5CryptoServiceProvider.ComputeHash(Stream) y se aplica recursivamente concatenando el hash de un archivo con el hash de sus #include.
private static string ComputeShaderFileMD5(string fileName, string fileBaseDir) { string md5; using (FileStream fs = new FileStream(fileBaseDir + fileName, FileMode.Open)) { md5 = BitConverter.ToString(new MD5CryptoServiceProvider().ComputeHash(fs)); fs.Position = 0; using (TextReader tr = new StreamReader(fs)) { string line = tr.ReadLine(); while (line != null) { if (line.StartsWith("#include \"")) { string includeName = line.Substring("#include \"".Length, line.Length - "#include \"".Length - "\"".Length); //Recursively compute the MD5 of the include file md5 += ComputeShaderFileMD5(includeName, fileBaseDir); } line = tr.ReadLine(); } } } return md5; }
Ejemplo de cacheEntries.txt:
D:\SlimDX\Framework\Framework\Resources\fxVarios.fx 45-43-29-04-00-39-4E-85-CA-3C-4B-97-7F-68-D5-77 D:\SlimDX\Framework\Framework\Resources\CSvsPSGaussianBlur\PSGaussianFilter.fx A9-81-CA-05-14-DD-1F-AE-06-C7-1E-AE-99-6F-1D-2147-4D-90-CD-5B-F6-35-A0-8E-51-50-35-78-71-E3-BD D:\SlimDX\Framework\Framework\Resources\CSvsPSGaussianBlur\CSGaussianFilterF3.fx 33-63-EF-D9-46-34-C3-0C-25-59-C1-FC-5C-3C-E0-CD46-E7-1E-D8-16-76-CA-5F-3E-BE-E8-9F-A7-4F-59-AA47-4D-90-CD-5B-F6-35-A0-8E-51-50-35-78-71-E3-BD
En el ejemplo se observa que el shader PSGaussianFilter.fx hace #include de un archivo X (su MD5 empieza con 47 y termina con BD) y CSGaussianFilterF3.fx de un archivo Y (46-...-AA) que a su vez incluye a X.
Shaderfile.cache
Una vez detectada una modificación en un archivo, se compila el ShaderBytecode y el mismo se graba en el disco en la misma carpeta que el archivo original, con el nombre original seguido de ".cache".
private static Effect CompileEffect(string fileName, string profile, ShaderFlags shaderFlags, EffectFlags effectFlags, ShaderMacro[] macros, Include includeHandler) { Debug.WriteLine("Compiling shader: " + fileName); using (ShaderBytecode shaderCode = ShaderBytecode.CompileFromFile(fileName, profile, shaderFlags, effectFlags, macros, includeHandler)) { using (FileStream fs = new FileStream(fileName + ".cache", FileMode.Create)) { using (BinaryWriter bw = new BinaryWriter(fs)) { bw.Write(shaderCode.Data.ReadRange((int)shaderCode.Data.Length)); } } return new Effect(Recursos.Device, shaderCode); } }
Pequeña limitación
Dado que no se realiza ningún tipo de lectura de macros o directivas al preprocesador (exceptuando el #include), si un archivo X se modifica dentro de un bloque #if #endif (o #ifdef #endif) y un archivo Y incluye a X, entonces Y se recompilará aún cuando no cumpla la condición de #if presente en X y la modificación hecha le sea trasparente.
ShaderCache.cs
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Security.Cryptography; using SlimDX; using SlimDX.D3DCompiler; using SlimDX.Direct3D11; using Debug = System.Diagnostics.Debug; using Recursos = Framework.Base; namespace Framework { /// <summary> /// A static class used for storing ShaderBytecode and avoiding compiling shaders that weren't modified /// </summary> public static class ShaderCache { /// <summary> /// Looks for the shader's bytecode cache. If found, returns a new Effect created from the bytecode. If not, compiles the Effect, stores it's bytecode and updates the cache entry. /// </summary> /// <param name="fileName">Full path of the shader file</param> /// <param name="profile">Target profile</param> /// <param name="shaderFlags">ShaderFlags (default ShaderFlags.WarningsAreErrors)</param> /// <param name="effectFlags">EffectFlags (default EffectFlags.None)</param> /// <param name="macros">Array of ShaderMacro (default null)</param> /// <param name="includeHandler">An include handler (default null)</param> /// <returns>The compiled Effect</returns> public static Effect CheckCacheAndCompileEffect(string fileName, string profile, ShaderFlags shaderFlags = ShaderFlags.WarningsAreErrors, EffectFlags effectFlags = EffectFlags.None, ShaderMacro[] macros = null, Include includeHandler = null) { if (CheckAndUpdateCache(fileName)) { byte[] byteCode; using (FileStream fs = new FileStream(fileName + ".cache", FileMode.Open)) { using (BinaryReader br = new BinaryReader(fs)) { byteCode = br.ReadBytes((int)fs.Length); } using (DataStream ds = new DataStream(byteCode, true, false)) { using (ShaderBytecode shaderCode = new ShaderBytecode(ds)) { return new Effect(Recursos.Device, shaderCode); } } } } else return CompileEffect(fileName, profile, shaderFlags, effectFlags, macros, includeHandler); } #region Private methods /// <summary> /// Compiles an Effect and writes its bytecode to the hard drive. /// </summary> /// <param name="fileName">Full path of the shader file</param> /// <param name="profile">Target profile</param> /// <param name="shaderFlags">ShaderFlags (default ShaderFlags.WarningsAreErrors)</param> /// <param name="effectFlags">EffectFlags (default EffectFlags.None)</param> /// <param name="macros">Array of ShaderMacro (default null)</param> /// <param name="includeHandler">An include handler (default null)</param> /// <returns>The compiled Effect</returns> private static Effect CompileEffect(string fileName, string profile, ShaderFlags shaderFlags, EffectFlags effectFlags, ShaderMacro[] macros, Include includeHandler) { Debug.WriteLine("Compiling shader: " + fileName); using (ShaderBytecode shaderCode = ShaderBytecode.CompileFromFile(fileName, profile, shaderFlags, effectFlags, macros, includeHandler)) { using (FileStream fs = new FileStream(fileName + ".cache", FileMode.Create)) { using (BinaryWriter bw = new BinaryWriter(fs)) { bw.Write(shaderCode.Data.ReadRange<byte>((int)shaderCode.Data.Length)); } } return new Effect(Recursos.Device, shaderCode); } } /// <summary> /// Generates the MD5 of the shader, compares it against the value stored in the cache entry, and updates the entry if necessary. /// </summary> /// <param name="fileName">Full path of the shader file</param> /// <returns>True if the bytecode stored in the cache is valid.</returns> private static bool CheckAndUpdateCache(string fullFilePath) { string fileBaseDir = fullFilePath.Substring(0, fullFilePath.LastIndexOf('\\') + 1); string fileName = fullFilePath.Substring(fullFilePath.LastIndexOf('\\') + 1); string md5 = ComputeShaderFileMD5(fileName, fileBaseDir); string[] entries; try { entries = File.ReadAllLines(Recursos.ResourcesDir + "ShadersCache\\cacheEntries.txt"); } catch (FileNotFoundException) { File.Create(Recursos.ResourcesDir + "ShadersCache\\cacheEntries.txt").Dispose(); entries = File.ReadAllLines(Recursos.ResourcesDir + "ShadersCache\\cacheEntries.txt"); } int i; for (i = 0; i < entries.Length && !entries[i].Contains(fullFilePath); i++) /*Not an extra semicolon*/; if (i == entries.Length) { Debug.WriteLine("Shader added to cache: " + fullFilePath); List<string> aux = entries.ToList(); aux.Add(fullFilePath + "\t" + md5); entries = aux.ToArray(); } else { string[] split = entries[i].Split(new char[] { '\t' }); if (split[1] == md5) { Debug.WriteLine("Shader found on cache: " + fullFilePath); return true; } else { Debug.WriteLine("Shader updated on cache: " + fullFilePath); entries[i] = fullFilePath + "\t" + md5; } } File.WriteAllLines(Recursos.ResourcesDir + "ShadersCache\\cacheEntries.txt", entries); return false; } /// <summary> /// Computes the MD5 of a shader file concatenated with the MD5 of each of the included files (#include) /// </summary> /// <param name="fileName">Full path of the shader file</param> /// <returns>MD5 as a string</returns> private static string ComputeShaderFileMD5(string fileName, string fileBaseDir) { string md5; using (FileStream fs = new FileStream(fileBaseDir + fileName, FileMode.Open)) { md5 = BitConverter.ToString(new MD5CryptoServiceProvider().ComputeHash(fs)); fs.Position = 0; using (TextReader tr = new StreamReader(fs)) { string line = tr.ReadLine(); while (line != null) { if (line.StartsWith("#include \"")) { string includeName = line.Substring("#include \"".Length, line.Length - "#include \"".Length - "\"".Length); //Recursively compute the MD5 of the include file md5 += ComputeShaderFileMD5(includeName, fileBaseDir); } line = tr.ReadLine(); } } } return md5; } /// <summary> /// Computes the MD5 of a file /// </summary> /// <param name="fileName">Name of the file</param> /// <param name="fileDir">Directory of the file (ending with \\)</param> /// <returns>MD5 of the file</returns> private static string ComputeFileMD5(string fileName, string fileDir) { using (FileStream fs = new FileStream(fileDir + fileName, FileMode.Open)) { return BitConverter.ToString(new MD5CryptoServiceProvider().ComputeHash(fs)); } } #endregion } }
6 notes
·
View notes
Text
Custom PageLayouts - Reset to SiteDefinition does not work
Recently I ran into an issue with a custom pagelayout i created as a feature in SharePoint 2010.
I added some WebPart Zones on the pagelayout and added WebParts to the zones manually. I'm fully aware that the best approach is to add webparts when pages are created instead of adding them to the pagelayout. However. The pagelayout was working just fine - until a few weeks ago when the packages were updated. Normally this is not an issue either.
I found out that the PageLayout in /_catalogs/masterpage was NOT the same as the physical pagelayout file. And NO. The pagelayout is NOT customized. I tried to reset to sitedefinition on that pagelayout but that did not do the trick. To me it seems like sharepoint caches the WebPart zones for some reason. When browsing the pagelayout in /_catalogs i got my webparts more that once. At least three instances of the same WebPart. That did not quite match with the original file ;)
What i learn to discover was that when you are creating a new page based on that pagelayout, i uses the version from /_catalogs and not the one from filesystem even though the page is not customized. However, the file in /_catalogs had errors but the original pagelayout didn't.
Here' what I did:
1. Edit the pagelayout in VS. Create a copy of the file.
2. Remove ALL WebPartZones in the pagelayout file.
3. Deploy and activate the solution.
4. If you have a look now at the page layout in /_catalogs everything should be fine - which means NO webparts - no nothing. Just at simple pagelayout.
5. Go back to Visual Studio and copy the original code back to the pagelayout from the copy you made in step 1.
6. Deploy and activate. Voila! Your problems will dissapear - at least it did for me. Now the webparts ONLY shows up once and they do not fail.
5 notes
·
View notes
Text
Visual Studio Package Load Errors
Visual Studio tip of the day:
When starting Visual Studio 2010 I received a number of error messages stating that various packages did not load correctly. After a couple of minutes with the Google I found a post on the Visual Studio forums that mentioned a command line hook "/ResetSettings".
From the Visual Studio Command prompt running with elevated permissions I ran the following command:
devenv /resetsettings
This reset visual studio back to it's default settings. I lost my font and color settings but the error messages are no longer popping up when I start up the development environment
5 notes
·
View notes
Text
Learning C-Sharp: Day One
Today I started my hopefully shorter than 29 day self-course on learning Visual C#. I'll try to document it here, as it will encourage me to work more through the book. This, aside from actually teaching me Visual C#, will hopefully fill in the gaps that I feel I have because of sketchy teaching from coursework. For those that don't know my entire background in Computer Science:
Senior year HS: Computer Science Pre-AP, basic Java and OOP stuff. Focused largely on theory and vocabulary.
Second semester TTU: Computer Science 1411, which was in C. The CS majors did Java, but we Elec/Comp Engineers did C. I've switched to CS now. A good course, and had lots of hands-on. Almost too much, given the limited resources.
Third semester TTU: Computer Science 1412, in C++. Way too much time spent on theory, and little actual application. Tests were multiple choice. Also took CS 1382, Discrete Math, and did poorly, as did the other 65% of the class who did not receive credit.
Fourth semester TTU: CS 2413, Data Structures. Learned not much.
So over this summer, since nobody will employ me, I'll be working through this new Visual C# 2010 book from Microsoft, and written by John Sharp. Hopefully the first month will be learning it, then June, July, and part of August will be working on a TTU Mobile app for Windows Phone 7, or at least doing a good chunk of the work.
Firstly a little bit of system info for those who are interested:
Freshly reinstalled Windows 7 Professional, thanks to the Microsoft student steal deal.
Full installation of Visual Studio 2010 Professional, thanks to my expensive fees at Texas Tech.
Windows Phone 7 developer tools available from DreamSpark.
Microsoft® Visual C#® 2010 Step by Step, by John Sharp, and published by Microsoft Press. Available a lot of places, especially the internets, but the important bit is the 2010 bit.
Zune player, which I will be listening to a lot.
Chapter One: Welcome to C#
The big thing today was getting a handle on VS 2010, and a little bit about namespaces and how C# works. Not too difficult for those of us who have used VS before. The most important part was about page 18 where there was a tutorial on using the graphical method of creating an interface. Very easy, and I'm surprised that none of this was covered in C++ or C intro classes. So far, the semantics haven't been discussed much, but the way the info was presented, like MessageBox.Show("Hello " + userName.Text); seems much better than implementations in C and C++.
Tomorrow: Working with Variables, Operators, and Expressions
If you want to follow along with me, just let me know what you'd want to see here and I can accommodate. If not, then just pretend I'm nerdy. Because it's true.
5 notes
·
View notes
Link
Here is a version of a Web Essentials extension that works with Visual Studio 2010
3 notes
·
View notes
Text
Looking to use Git on windows development machine. Any recommended open source Git tool out there for windows?
2 notes
·
View notes